        <div class="search">
            <div class="form">
                <div id="tabs-search">
                    <ul class="tabs-menu">
                        <li <?php echo (isset($this->fill)) ? 'class="active"' : '';?> id="tabs-1"><span>Tìm theo tháng</span></li>
                        <li <?php echo (isset($this->fill)) ? '' : 'class="active"';?> id="tabs-2"><span>Tìm theo ngày</span></li>
                    </ul>
                    <div class="tabs tabs-1 <?php echo (isset($this->fill)) ? '' : 'hidden';?>">
                        <form name="fSeachMonth" action="<?php echo $this->action;?>" method="POST" onsubmit="return checkSearchMonth();">
                            <div class="date">
                                <label>Tháng</label>
                                <input type="text" name="date" readonly="readonly" value="<?php echo (isset($this->date)) ? substr($this->date,0,7) : '';?>" id="monthpicker"/>
                            </div>
                            <div class="type">
                                <?php if(isset($this->gameId) && $this->gameId == "ssg"){ ?>
                                    <?php if($this->activeuser){ ?>
                                    <label>Active user</label>
                                    <select name="activeuser">
                                        <option value="A1" <?php echo ($this->activeuser == 'A1') ? 'selected="selected"' : '';?>>A1</option>
                                        <option value="A30" <?php echo ($this->activeuser == 'A30') ? 'selected="selected"' : '';?>>A30</option>
                                    </select>
                                    <div class="clear-both"></div>
                                    <div class="server">
                                    <?php } ?>
                                        <select name="type" class="typeFill hidden">
                                            <option value="game">Game</option>
                                        </select>
                                        <label>Nhóm game</label>
                                        <select name="clusterId">
                                            <?php
                                                foreach($this->clusters as $key=>$value){
                                            ?>
                                                <option value="<?php echo $key;?>" <?php if(isset($this->clusterId) && $this->clusterId == $key) echo 'selected="selected"';?>><?php echo $value['name'];?></option>
                                            <?php
                                                }
                                            ?>
                                        </select>
                                        <div class="clear-both"></div>
                                    <?php if($this->activeuser){ ?>
                                    </div>
                                    <?php } ?>
                                <?php }else{ ?>
                                    <label>Kiểu xem</label>
                                    <select name="type" class="typeFill">
                                        <option value="index" <?php echo (isset($this->clusterId)) ? '' : 'selected="selected"';?>>Channel</option>
                                        <?php if(!isset($this->serverListMenu) || $this->serverListMenu != 0){ ?>
                                        <option value="server" <?php echo (isset($this->clusterId)) ? 'selected="selected"' : '';?>>Cụm server</option>
                                        <?php } ?>
                                    </select>
                                    <div class="clear-both"></div>
                                    <div class="server <?php echo (isset($this->clusterId)) ? '' : 'hidden';?>">
                                        <label>Cụm server</label>
                                        <select name="clusterId">
                                            <?php
                                                foreach($this->clusters as $key=>$value){
                                            ?>
                                                <option value="<?php echo $key;?>" <?php if(isset($this->clusterId) && $this->clusterId == $key) echo 'selected="selected"';?>><?php echo $value['name'];?></option>
                                            <?php
                                                }
                                            ?>
                                        </select>
                                        <div class="clear-both"></div>
                                    </div>
                                <?php } ?>
                            </div>
                            <div class="submit">
                                <input type="submit" name="bntSubmit" value="Lọc" class="loading"/>
                            </div>
                            <div class="clear-both"></div>
                        </form>
                    </div>
                    <div class="tabs tabs-2 <?php echo (isset($this->fill)) ? 'hidden' : '';?>">
                        <form name="fSeachDate" action="<?php echo $this->action;?>" method="POST" onsubmit="return checkSearchDate();">
                            <div class="date">
                                <label>Từ ngày</label>
                                <input type="text" name="dateStart" readonly="readonly" value="<?php echo (isset($this->dateStart)) ? $this->dateStart : '';?>" class="datepicker2"/>
                                <div class="clear-both"></div>
                                <div class="dateEnd">
                                    <label>Đến ngày</label>
                                    <input type="text" name="dateEnd" readonly="readonly" value="<?php echo (isset($this->dateEnd)) ? $this->dateEnd : '';?>" class="datepicker2"/>
                                </div>
                            </div>
                            <div class="type">
                                <?php if(isset($this->gameId) && $this->gameId == "ssg"){ ?>
                                    <?php if($this->activeuser){ ?>
                                    <label>Active user</label>
                                    <select name="activeuser">
                                        <option value="A1" <?php echo ($this->activeuser == 'A1') ? 'selected="selected"' : '';?>>A1</option>
                                        <option value="A30" <?php echo ($this->activeuser == 'A30') ? 'selected="selected"' : '';?>>A30</option>
                                    </select>
                                    <div class="clear-both"></div>
                                    <div class="server">
                                    <?php } ?>
                                        <select name="type" class="typeFill hidden">
                                            <option value="game">Game</option>
                                        </select>
                                        <label>Nhóm game</label>
                                        <select name="clusterId">
                                            <?php
                                                foreach($this->clusters as $key=>$value){
                                            ?>
                                                <option value="<?php echo $key;?>" <?php if(isset($this->clusterId) && $this->clusterId == $key) echo 'selected="selected"';?>><?php echo $value['name'];?></option>
                                            <?php
                                                }
                                            ?>
                                        </select>
                                        <div class="clear-both"></div>
                                    <?php if($this->activeuser){ ?>
                                    </div>
                                    <?php } ?>
                                <?php }else{ ?>
                                    <label>Kiểu xem</label>
                                    <select name="type" class="typeFill">
                                        <option value="index" <?php echo (isset($this->clusterId)) ? '' : 'selected="selected"';?>>Channel</option>
                                        <?php if(!isset($this->serverListMenu) || $this->serverListMenu != 0){ ?>
                                        <option value="server" <?php echo (isset($this->clusterId)) ? 'selected="selected"' : '';?>>Cụm server</option>
                                        <?php } ?>
                                    </select>
                                    <div class="clear-both"></div>
                                    <div class="server <?php echo (isset($this->clusterId)) ? '' : 'hidden';?>">
                                        <label>Cụm server</label>
                                        <select name="clusterId">
                                            <?php
                                                foreach($this->clusters as $key=>$value){
                                            ?>
                                                <option value="<?php echo $key;?>" <?php if(isset($this->clusterId) && $this->clusterId == $key) echo 'selected="selected"';?>><?php echo $value['name'];?></option>
                                            <?php
                                                }
                                            ?>
                                        </select>
                                        <div class="clear-both"></div>
                                    </div>
                                <?php } ?>
                            </div>
                            <div class="submit">
                                <input type="submit" name="bntSubmit" value="Tìm" class="loading"/>
                            </div>
                            <div class="clear-both"></div>
                        </form>
                    </div>
                    <div class="clear-both"></div>
                </div>
                <div class="clear-both"></div>
            </div>
            <div class="clear-both"></div>
            <script type="text/javascript">
                function checkSearchDate(){
                    var dateStart = document.fSeachDate.dateStart.value;
                    var dateEnd = document.fSeachDate.dateEnd.value;
                    if (dateStart==null || dateStart=="")
                    {
                        alert("Vui lòng chọn ngày bắt đầu!");
                        $('.loading-please-wait').css('display','none');
                        return false;
                    }
                    if (dateEnd==null || dateEnd=="")
                    {
                        alert("Vui lòng chọn ngày kết thúc!");
                        $('.loading-please-wait').css('display','none');
                        return false;
                    }
                    return true;
                }
                function checkSearchMonth(){
                    var dateM = document.fSeachMonth.date.value;
                    if (dateM==null || dateM=="")
                    {
                        alert("Vui lòng chọn tháng!");
                        $('.loading-please-wait').css('display','none');
                        return false;
                    }
                    return true;
                }
                $(document).ready(function(){
                    $('.typeFill').change(function() {
                      val = $(this).find("option:selected").val();
                      if(val == 'index'){
                        $(this).parent().find(".server").addClass('hidden');
                      }else if(val == 'server'){
                        $(this).parent().find(".server").removeClass('hidden');
                      }
                    });
                })
            </script>
        </div>